
package harlequin;

import java.sql.*;
import javax.swing.*;


public class AddEditDeleteShow extends JFrame{
    
    public Connection connector;
    public String title;
    public String dateTimeslot;
    public String slot;
    public String price;
    public int audienceCount = 0;
    
public boolean DateExists(String dateTimeslot) throws SQLException{
    
    String query = "select * from play";
    PreparedStatement preparedStatement = connector.prepareStatement(query);
    ResultSet set = preparedStatement.executeQuery(query);
    
    while(set.next()){
        if(set.getString("dateTimeslot").equals(dateTimeslot)) 
            return true;
    }
    
    return false;
}
    
}
